package com.sinodata.bsm.common.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * UserLog entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "USER_LOG")
public class UserLog implements java.io.Serializable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 5582200956497947797L;

    // Fields  
    private Long id;
    private String user;
    private Long resId;
    private Integer kind;
    private Integer succeed;
    private String msg;
    private Date time;

    // Constructors

    /** default constructor */
    public UserLog() {
    }

    /** minimal constructor */
    public UserLog(Long id) {
        this.id = id;
    }

    /** full constructor */
    public UserLog(Long id, String user, Long resId, Integer kind, Integer succeed, String msg, Date time) {
        this.id = id;
        this.user = user;
        this.resId = resId;
        this.kind = kind;
        this.succeed = succeed;
        this.msg = msg;
        this.time = time;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "USER_LOG_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "USER_", length = 128)
    public String getUser() {
        return this.user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    @Column(name = "RES_ID", precision = 18, scale = 0)
    public Long getResId() {
        return this.resId;
    }

    public void setResId(Long resId) {
        this.resId = resId;
    }

    @Column(name = "KIND", precision = 2, scale = 0)
    public Integer getKind() {
        return this.kind;
    }

    public void setKind(Integer kind) {
        this.kind = kind;
    }

    @Column(name = "SUCCEED", precision = 1, scale = 0)
    public Integer getSucceed() {
        return this.succeed;
    }

    public void setSucceed(Integer succeed) {
        this.succeed = succeed;
    }

    @Column(name = "MSG", length = 2048)
    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Column(name = "TIME", length = 7)
    public Date getTime() {
        return this.time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    @Override
    public String toString() {
        return "UserLog [id=" + id + ", user=" + user + ", resId=" + resId + ", kind=" + kind + ", succeed=" + succeed + ", msg=" + msg + ", time=" + time + "]";
    }

}